//
//  CJInterstitialAd.h
//  CJMobileAd
//
//  Created by JJ on 2022/2/26.
//  Copyright © 2022 JJ. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN
@class CJInterstitialAd;
@protocol CJInterstitialAdDelegate <NSObject>

- (void)interstitialAdDidLoad:(CJInterstitialAd *)interstitialAd resourceId:(NSString *)resourceId;

- (void)interstitialAdLoadFailed:(CJInterstitialAd *)interstitialAd error:(NSError *)error;

- (void)interstitialAdOnClicked:(CJInterstitialAd *)interstitialAd;

- (void)interstitialAdOnClosed:(CJInterstitialAd *)interstitialAd;

@end

@interface CJInterstitialAd : NSObject

@property (nonatomic,weak) id <CJInterstitialAdDelegate> delegate;

- (instancetype)initWithResourceId:(NSString *)resourceId;

- (void)loadAdData;

- (void)showFromRootViewController:(UIViewController *)rootViewController;

@end

NS_ASSUME_NONNULL_END
